package ru.evga.inse.core.dao.impl;

import java.util.Collections;
import java.util.List;

import ru.evga.inse.core.dao.IResultContainer;
import ru.evga.inse.core.domain.BaseEntity;


public class ResultContainer<E extends BaseEntity>
    implements IResultContainer<E>
{
    private List<E> resultCollection;
    private boolean hasNext;
    private boolean hasPrevious;


    public void setDataContainer(List<E> data)
    {
        resultCollection = data;
    }

    public List<E> getResult()
    {
        return Collections.unmodifiableList(resultCollection);
    }

    public boolean isHasNext()
    {
        return hasNext;
    }

    public boolean isHasPrevious()
    {
        return hasPrevious;
    }

    public void setHasNext(boolean hasNext)
    {
        this.hasNext = hasNext;
    }

    public void setHasPrevious(boolean hasPrevious)
    {
        this.hasPrevious = hasPrevious;
    }
}
